package com.atguigu.spring.processor.factory;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.core.PriorityOrdered;
import org.springframework.stereotype.Component;

/**
 * BeanFactory的后置处理器
 *
 * @author caodan
 */
@Component
public class MyBeanFactoryPostProcessorPriorityOrdered implements BeanFactoryPostProcessor, PriorityOrdered {


	public MyBeanFactoryPostProcessorPriorityOrdered() {
		System.out.println("MyBeanFactoryPostProcessor2...");
	}

	@Override
	public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
		System.out.println("BeanFactoryPostProcessor2....postProcessBeanFactory==>" + beanFactory);
	}

	@Override
	public int getOrder() {
		return 0;
	}
}
